home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 652 b | 33 lines | [TEXT/ToyS] |
- property kasUniverseName : "Universal Property Test"
-
- on run
- -- Get our Universal Value
- set n to 1 + GetUniversalValue(kasUniverseName)
-
- -- Make it nice :)
- set nTxt to n & " time"
- if (n > 1) then set nTxt to nTxt & "s"
-
- -- Show it
- display dialog "We have been run " & nTxt & " since the last restart." buttons {"OK"} default button 1
-
- -- Update it
- SetUniversalProperty(kasUniverseName, n)
- end run
-
-
- on GetUniversalValue(name)
- try
- set val to «event ÅkuUUVar» name
- on error
- set val to 0
- end try
-
- return val
- end GetUniversalValue
-
-
- on SetUniversalProperty(name, n)
- «event ÅkuUUVar» name given «class VObj»:n
- end SetUniversalProperty
-